package com.itheima.controller;

import com.itheima.dao.UserDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserController {
    public static void main(String[] args) {
        //创建核心容器IOC
        ApplicationContext cc = new ClassPathXmlApplicationContext("spring.xml");
//        UserService userService = (UserService) cc.getBean("userService");
//        userService.save();

        UserDao userDao = (UserDao) cc.getBean("userDao");
        userDao.save();
    }
}
